<?
/*
    To add new language create new file in lang directory.
    File should be named lang.[LANGUAGE_CODE].php
    Add new image to img sirectory. Image should be named: [LANGUAGEE_CODE].gif
    In array below add new entry in format:
    'language_code' => 'language_name'  
*/

    $languages = array(
    'en'    =>  'English',
    'pl'    =>  'Polski'
    );
/*
    echo '<form name="lang_form" method="POST" class="hidden_form">
                <input type="hidden" name="lang" value="'.$lng.'"/>
         </form>';
    echo '<center>
            <table class="lang_table">
                <tr>
                    <th class="lng_cell">'.$lang["LANGUAGE"].':</th>';
    foreach($languages as $key => $value) {
        echo '<td class="selectable'.($key == $lng?' selected_image':'').'">';
        echo '  <input type="image" class="lng_image" src="lang/img/'.$key.'.gif" title="'.$value.'" alt="['.$value.']" onClick="document.lang_form.lang.value=\''.$key.'\';document.lang_form.submit()"/>';
        echo '</td>';
    }
    echo '<td width="100%"/>';
    echo '<td class="lng_cell">';
    include_once('styles/style_choose.php');
    echo '</td></tr></table><center>';
    
    */
    
    echo '<form name="lang_form" method="POST" class="lang_form">
                <input type="hidden" name="lang" value="'.$lng.'"/>
         <table class="fill">
                <tr>
                    <th class="half right">'.$lang["LANGUAGE"].':</th>
                    <td class="half">
                        <ul class="lang_list">
                            <li class="selected_lng">
                                <input type="image" class="lng_image" src="lang/img/'.$lng.'.gif" title="'.$languages[$lng].'" alt="['.$languages[$lng].']">
                            </li>';
    foreach($languages as $key => $value) {
        if($key == $lng)
            continue;
        echo '              <li>
                                <input type="image" class="lng_image" src="lang/img/'.$key.'.gif" title="'.$value.'" alt="['.$value.']" onClick="document.lang_form.lang.value=\''.$key.'\';document.lang_form.submit()"/>
                            </li>';   
    }                     
    echo '              </ul>
                    </td>
                </tr>
            </table>
        </form>';
?>
